<template>
  <div id="app">
    <RouterView />
  </div>
</template>

<script setup lang="ts">
// 重定向, 通过判断用户的设备信息, 判断是否为移动端或者pc端, 刷新的时候跳转, 如果为移动端, path跳转为m
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

import isMobile from '@/unit/isMobile'
onMounted(() => {
  let router = useRouter()
  let path = '/'
  isMobile() && (path = '/m')
  router.replace(path)
})
</script>

<style>
.class {
  width: 10px;
}
</style>
